import { VEEdge, VEMesh, VEVertex } from "../core/";

export function addEdge(
  ve_mesh: VEMesh,
  v1: VEVertex,
  v2: VEVertex): VEEdge {
  if (v1.edge && v2.edge && (v1.edge === v2.edge)) {
    return v1.edge;
  } else {
    const e = new VEEdge(v1, v2)
    ve_mesh.edges.push(e);
    return e;
  }
}